package com.nova.edc.model.system;

import com.nova.frame.annotation.Id;
import com.nova.frame.annotation.Join;
import com.nova.frame.annotation.Table;
import com.nova.frame.annotation.Transient;
import com.nova.module.filter.annotation.FilterCondition;
import com.nova.module.filter.query.FilterMode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Table("t_customerinfo")
public class CustomerInfo implements Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	private Integer id;
	@FilterCondition
	private Integer groupcode;
	private String groupname;
	@FilterCondition(filterMode = FilterMode.LIKE)
	private Integer companycode;
	@FilterCondition(filterMode = FilterMode.LIKE)
	private String customername;
	private String etype;
	private BigDecimal copeproportion;
	private Integer warningtype;
	private String contact;
	private String contactduty;
	private String address;
	private String tel;
	private String mobile;
	private String email;
	private String memo;
	private Integer scrapped;
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date modifystamp;
	@FilterCondition
	private String addby;
	private Date adddate;
	private String modifyby;
	private Date modifydate;
	private BigDecimal maintenanceprice;
	private BigDecimal conventionprice;
	private Integer lastpaydate;
	private Integer warningflag;
	private Integer maxpoint;
	private Integer bonuspoint;
	private Integer employeenum;
	private BigDecimal square;
	private BigDecimal savetarget;
	private BigDecimal moneysavetarget;
	private String lng;
	private String lat;
	private String province;
	private String city;
	private String district;
	private String street;
	private String streetnumber;
	@Transient
	private Integer status;
	@SuppressWarnings("unused")
	@Transient
	private String statusName;
	private String brand;
	private Integer customerinfotype;
	@Transient
	private String customerinfotypename;
	private Integer architecturetype;

	public Integer getArchitecturetype() {
		return architecturetype;
	}

	public void setArchitecturetype(Integer architecturetype) {
		this.architecturetype = architecturetype;
	}

	public String getCustomerinfotypename() {
		return ModelConstant.CUSTOMERINFO_TYPE.get(customerinfotype);
	}

	public void setCustomerinfotypename(String customerinfotypename) {
		this.customerinfotypename = customerinfotypename;
	}

	public Integer getCustomerinfotype() {
		return customerinfotype;
	}

	public void setCustomerinfotype(Integer customerinfotype) {
		this.customerinfotype = customerinfotype;
	}

	public CustomerInfo() {
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getGroupcode() {
		return groupcode;
	}

	public void setGroupcode(Integer groupcode) {
		this.groupcode = groupcode;
	}

	public String getGroupname() {
		return groupname;
	}

	public void setGroupname(String groupname) {
		this.groupname = groupname;
	}

	public Integer getCompanycode() {
		return companycode;
	}

	public void setCompanycode(Integer companycode) {
		this.companycode = companycode;
	}

	public String getCustomername() {
		return customername;
	}

	public void setCustomername(String customername) {
		this.customername = customername;
	}

	public String getEtype() {
		return etype;
	}

	public void setEtype(String etype) {
		this.etype = etype;
	}

	public BigDecimal getCopeproportion() {
		return copeproportion;
	}

	public void setCopeproportion(BigDecimal copeproportion) {
		this.copeproportion = copeproportion;
	}

	public Integer getWarningtype() {
		return warningtype;
	}

	public void setWarningtype(Integer warningtype) {
		this.warningtype = warningtype;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getContactduty() {
		return contactduty;
	}

	public void setContactduty(String contactduty) {
		this.contactduty = contactduty;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public Integer getScrapped() {
		return scrapped;
	}

	public void setScrapped(Integer scrapped) {
		this.scrapped = scrapped;
	}

	public Date getModifystamp() {
		return modifystamp;
	}

	public void setModifystamp(Date modifystamp) {
		this.modifystamp = modifystamp;
	}

	public String getAddby() {
		return addby;
	}

	public void setAddby(String addby) {
		this.addby = addby;
	}

	public Date getAdddate() {
		return adddate;
	}

	public void setAdddate(Date adddate) {
		this.adddate = adddate;
	}

	public String getModifyby() {
		return modifyby;
	}

	public void setModifyby(String modifyby) {
		this.modifyby = modifyby;
	}

	public Date getModifydate() {
		return modifydate;
	}

	public void setModifydate(Date modifydate) {
		this.modifydate = modifydate;
	}

	public BigDecimal getMaintenanceprice() {
		return maintenanceprice;
	}

	public void setMaintenanceprice(BigDecimal maintenanceprice) {
		this.maintenanceprice = maintenanceprice;
	}

	public BigDecimal getConventionprice() {
		return conventionprice;
	}

	public void setConventionprice(BigDecimal conventionprice) {
		this.conventionprice = conventionprice;
	}

	public Integer getLastpaydate() {
		return lastpaydate;
	}

	public void setLastpaydate(Integer lastpaydate) {
		this.lastpaydate = lastpaydate;
	}

	public Integer getWarningflag() {
		return warningflag;
	}

	public void setWarningflag(Integer warningflag) {
		this.warningflag = warningflag;
	}

	public Integer getMaxpoint() {
		return maxpoint;
	}

	public void setMaxpoint(Integer maxpoint) {
		this.maxpoint = maxpoint;
	}

	public Integer getBonuspoint() {
		return bonuspoint;
	}

	public void setBonuspoint(Integer bonuspoint) {
		this.bonuspoint = bonuspoint;
	}

	public Integer getEmployeenum() {
		return employeenum;
	}

	public void setEmployeenum(Integer employeenum) {
		this.employeenum = employeenum;
	}

	public BigDecimal getSquare() {
		return square;
	}

	public void setSquare(BigDecimal square) {
		this.square = square;
	}

	public BigDecimal getSavetarget() {
		return savetarget;
	}

	public void setSavetarget(BigDecimal savetarget) {
		this.savetarget = savetarget;
	}

	public BigDecimal getMoneysavetarget() {
		return moneysavetarget;
	}

	public void setMoneysavetarget(BigDecimal moneysavetarget) {
		this.moneysavetarget = moneysavetarget;
	}

	public String getLng() {
		return lng;
	}

	public void setLng(String lng) {
		this.lng = lng;
	}

	public String getLat() {
		return lat;
	}

	public void setLat(String lat) {
		this.lat = lat;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district;
	}

	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	public String getStreetnumber() {
		return streetnumber;
	}

	public void setStreetnumber(String streetnumber) {
		this.streetnumber = streetnumber;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getStatusName() {
		if (status != null) {
			switch (status) {
			case ModelConstant.PAY_NOTPAY:
				return "未缴费";
			case ModelConstant.PAY_PAID:
				return "已缴费";
			case ModelConstant.PAY_DELAY:
				return "延期缴费";
			default:
				return "未缴费";
			}
		} else {
			return null;
		}

	}

	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}

}
